package com.srcptit.java.training.kienbd.btvn1;

import java.util.Scanner;

import java.lang.Math;

public class Muc1Bai4NSonguyentodautien {
	static boolean Songuyento(int n){//Kiem tra so nguyen to.
            if( n<2 )           return false;
            for(int i=2;i<=Math.sqrt(n);i++)
            if( n%i==0 )        return false;
            return true;
	}
	static void Nsonguyento(int n){//Xuat ra n so nguyen to khac nhau.
            System.out.print("2 ");
            int dem=1, i=3;
            while(dem<n){
		if( Songuyento(i)==true ){// Neu i la so nguyen to.
                    System.out.print(i+" ");
                    dem++;
                }i=i+2;//i deu la so le.
            }
	}
	public static void main(String args[]){
            Scanner input = new Scanner(System.in);
            String str = input.next();
            try {
                int n = Integer.parseInt(str);
                System.out.print("YES! "+n+" so nguyen to dau tien : ");   
                Nsonguyento(n);
                System.out.println();
            }catch(Exception e) {
                System.out.println("NO! Vui ong nhap lai.");
            }
            input.close();
        }
    }
